package com.zy.nettypoject.netty.nio;

import java.io.IOException;
import java.net.InetSocketAddress;
import java.nio.ByteBuffer;
import java.nio.channels.SocketChannel;
import java.nio.charset.Charset;

public class Client { 
    public static void main(String[] args) throws Exception {
        SocketChannel open = SocketChannel.open(new InetSocketAddress(8099));
//        ByteBuffer allocate = ByteBuffer.allocate(16);
//        allocate.putChar('A');
//        open.write(Charset.defaultCharset().encode("Hello"));
        System.out.println("客户端发送");
        open.close();
    }
}
